package com.hakim.wfb.admin.model.common.page;

import com.google.common.collect.Lists;
import org.apache.commons.lang3.math.NumberUtils;

import java.io.Serializable;
import java.util.List;

public class Pagination<E> implements Serializable {

    /**
     */
    private static final long serialVersionUID = -6420383105318784880L;

    /**
     * 总记录数
     */
    private Integer total = NumberUtils.INTEGER_ZERO;

    /**
     * 集合对象
     */
    private List<E> rows = Lists.newArrayList();

    public Pagination() {
        super();
    }

    public Pagination(Integer total, List<E> rows) {
        super();
        this.total = total;
        this.rows = rows;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public List<E> getRows() {
        return rows;
    }

    public void setRows(List<E> rows) {
        this.rows = rows;
    }

    @Override
    public String toString() {
        return "Pagination [total=" + total + ", rows=" + rows + "]";
    }

}
